1 00:00:00,230 --> 00:00:03,800 Now let's add our cabins to our lots with code. 2 00:00:03,800 --> 00:00:06,650 And I'm going to use the cabin from the last video. 3 00:00:06,650 --> 00:00:11,300 So if we go to our toolbox, I'm under the home tab toolbox. 4 00:00:11,480 --> 00:00:14,060 That's the cabin boom. 5 00:00:14,060 --> 00:00:14,720 There we go. 6 00:00:14,720 --> 00:00:17,060 And I'll close the toolbox. 7 00:00:17,150 --> 00:00:19,100 I'm going to change the orientation of my cabin. 8 00:00:22,030 --> 00:00:22,630 Cool. 9 00:00:22,630 --> 00:00:24,760 And then I'm going to center it a little bit more. 10 00:00:26,010 --> 00:00:27,470 Not going to make it perfect. 11 00:00:28,870 --> 00:00:33,160 You could you could change this depending if you want more of a front yard, back yard, you might want 12 00:00:33,170 --> 00:00:34,990 a garage or something. 13 00:00:34,990 --> 00:00:37,060 You may need to make your lots bigger. 14 00:00:37,570 --> 00:00:39,040 That looks pretty good. 15 00:00:39,190 --> 00:00:42,240 Let's add a part to our cab and that's going to be the anchor part. 16 00:00:42,240 --> 00:00:44,970 It's also going to be the primary part to the model. 17 00:00:44,980 --> 00:00:47,110 Let's just hit this plus sign here. 18 00:00:47,380 --> 00:00:49,120 Hit a P for part. 19 00:00:49,780 --> 00:00:50,290 There we go. 20 00:00:50,290 --> 00:00:52,000 That's going to be our anchor part. 21 00:00:52,180 --> 00:00:53,800 Let's call that part. 22 00:00:53,830 --> 00:00:55,150 It's inside the cabin. 23 00:00:55,900 --> 00:00:57,310 Inside the cabin model. 24 00:00:57,310 --> 00:01:04,530 So I'm going to call this cabin anchor because we have a lot of anchors floating around. 25 00:01:04,540 --> 00:01:04,870 Now. 26 00:01:04,870 --> 00:01:08,500 We know the front is pointing to the left from past experience. 27 00:01:08,500 --> 00:01:13,090 But just in case you don't know, hit the plus sign, add a decal. 28 00:01:13,120 --> 00:01:19,030 It'll default to the front face front, and you can't really see them that well anymore. 29 00:01:19,030 --> 00:01:20,770 I think that update just happened today. 30 00:01:20,770 --> 00:01:23,830 But if you hover your mouse over it, you can see it. 31 00:01:24,130 --> 00:01:25,180 Nice. 32 00:01:25,180 --> 00:01:26,860 Now let's rotate our part. 33 00:01:26,860 --> 00:01:32,380 So get your cabin anchor, get the rotate, and I have it on 15 degree increments. 34 00:01:32,710 --> 00:01:34,450 Boom, boom, boom. 35 00:01:34,450 --> 00:01:36,100 So that's facing front. 36 00:01:36,130 --> 00:01:37,540 There's the decal. 37 00:01:37,660 --> 00:01:38,650 Nice. 38 00:01:39,070 --> 00:01:39,580 All right. 39 00:01:39,610 --> 00:01:42,730 On my cabin anchor, I'm going to make it invisible. 40 00:01:42,730 --> 00:01:45,100 So I'm going to go to transparency and the properties. 41 00:01:45,490 --> 00:01:46,690 I'm going to hit one. 42 00:01:46,690 --> 00:01:48,100 So it's invisible. 43 00:01:48,190 --> 00:01:51,820 I'm going to go down to Can Collide. 44 00:01:51,820 --> 00:01:54,580 I'm going to turn that off and anchored. 45 00:01:54,580 --> 00:01:56,030 I'm going to turn that on now. 46 00:01:56,030 --> 00:01:59,480 I'm going to position my cabin anchor over my lot anchor. 47 00:01:59,480 --> 00:02:00,710 So. 48 00:02:01,520 --> 00:02:03,890 I need to get the position of my lot. 49 00:02:03,920 --> 00:02:09,050 Anchor And we have a couple lots, so we don't want to get the wrong one if I open up lots. 50 00:02:09,620 --> 00:02:10,880 Oh man, we got three of them. 51 00:02:10,880 --> 00:02:17,060 We could delete them or I could just go ahead and hit the alt key and then click on the lot part. 52 00:02:17,060 --> 00:02:22,400 And that's going to select the lot of my player lot, the lot, part of my player lot. 53 00:02:22,430 --> 00:02:23,900 Here's the anchor I want. 54 00:02:23,930 --> 00:02:25,910 I can see it light up inside there. 55 00:02:25,910 --> 00:02:29,720 I'm going to go to the position of the anchor and I'm going to scroll up. 56 00:02:30,690 --> 00:02:32,040 See frame possession. 57 00:02:32,040 --> 00:02:35,190 Let's go ahead and get that click, click there on the position. 58 00:02:35,220 --> 00:02:36,990 Do A control C to copy it. 59 00:02:36,990 --> 00:02:44,640 We're going to go up to our cabin anchor and then on the C frame position of the cabin anchor, let's 60 00:02:44,640 --> 00:02:46,950 go ahead and whoops, can I get it? 61 00:02:46,950 --> 00:02:52,350 Control V Oh man, let's go ahead and do a delete and then control. 62 00:02:52,380 --> 00:02:54,810 V All right, nice. 63 00:02:54,810 --> 00:02:56,100 Now it's in place. 64 00:02:56,100 --> 00:02:58,890 Now I got to get the cabin. 65 00:02:59,620 --> 00:03:06,310 Primary part select to the right there and then click cabin anchor. 66 00:03:07,200 --> 00:03:12,630 Let's go ahead and move our cabin down to server storage. 67 00:03:12,660 --> 00:03:16,230 Cabin server storage. 68 00:03:16,320 --> 00:03:18,300 Oops, I got it in the starter Gooey. 69 00:03:18,330 --> 00:03:19,230 Server storage. 70 00:03:19,230 --> 00:03:19,870 There we go. 71 00:03:19,910 --> 00:03:21,840 Should be right beside the fence. 72 00:03:22,830 --> 00:03:25,370 Let's go to our server script service. 73 00:03:25,380 --> 00:03:28,740 Open that up property test. 74 00:03:29,380 --> 00:03:30,070 Cool. 75 00:03:30,070 --> 00:03:34,630 And we're going to use this code when we do the purchasing and placing so it's not wasted. 76 00:03:34,630 --> 00:03:36,130 We might do some cutting and pasting. 77 00:03:36,760 --> 00:03:40,690 Let's get a reference for our cabin and this is going to be the original. 78 00:03:40,690 --> 00:03:44,170 So I'm going to call this cabin temp for cabin template. 79 00:03:44,170 --> 00:03:52,630 We're going to clone this and we'll do a server storage, wait for Child Cabin. 80 00:03:52,660 --> 00:03:53,890 There we go. 81 00:03:54,580 --> 00:03:55,000 All right. 82 00:03:55,000 --> 00:03:59,560 So like the fence, we are going to clone the cabin. 83 00:03:59,560 --> 00:04:00,790 So we'll say local. 84 00:04:01,910 --> 00:04:05,060 Cabin from the cabin temp. 85 00:04:05,690 --> 00:04:06,530 There we go. 86 00:04:06,530 --> 00:04:07,400 Clone it. 87 00:04:09,080 --> 00:04:11,630 The fence parent is going to be the lot. 88 00:04:11,660 --> 00:04:13,760 We're going to make the cabin parent. 89 00:04:13,970 --> 00:04:18,290 The lot also cool. 90 00:04:18,290 --> 00:04:21,590 Now the anchor is for the lot anchor. 91 00:04:21,590 --> 00:04:22,860 So we keep it like that. 92 00:04:22,890 --> 00:04:24,230 Oh, and I looked up, get pivot. 93 00:04:24,230 --> 00:04:27,470 It does return a key frame so you don't have to worry about positioning it. 94 00:04:27,470 --> 00:04:34,520 So it's very similar to the old way of doing the set primary part key frame a little bit easier, but 95 00:04:34,520 --> 00:04:37,610 it's new, so it might throw you off a little bit. 96 00:04:37,880 --> 00:04:41,330 The pivot is for the anchor of the lot. 97 00:04:41,360 --> 00:04:53,930 Let's get our cabin and we'll do a pivot too, which sets the primary part C frame to the anchor part. 98 00:04:54,350 --> 00:04:57,830 And that's our cabin anchor to the lot Anchor. 99 00:04:57,830 --> 00:04:59,150 So there we go. 100 00:04:59,250 --> 00:05:02,880 Oh, should we put like a little a weight in for effect? 101 00:05:02,910 --> 00:05:04,740 Maybe a weight one here? 102 00:05:04,890 --> 00:05:05,460 Yeah. 103 00:05:05,460 --> 00:05:06,750 One weight statement is good enough. 104 00:05:06,750 --> 00:05:10,170 Let's go ahead and hit the play button, see what we got. 105 00:05:13,640 --> 00:05:17,000 All right, In a few seconds, we should start getting some houses. 106 00:05:18,240 --> 00:05:19,290 House and fence. 107 00:05:19,290 --> 00:05:20,070 House and fence. 108 00:05:20,070 --> 00:05:20,850 House and fence. 109 00:05:20,880 --> 00:05:21,320 All right. 110 00:05:21,330 --> 00:05:21,960 Looking good. 111 00:05:21,960 --> 00:05:23,400 It is oriented properly. 112 00:05:23,400 --> 00:05:24,980 It is positioned properly. 113 00:05:24,990 --> 00:05:32,010 Now, when we buy stuff, we can put the houses and the fences where we want them with code. 114 00:05:32,040 --> 00:05:35,940 I will see you in the next video and we will continue onward with that.